package org.chen.common.email.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

@Data
public class EmailConfigDTO {
    
    private Boolean enabled;
    
    @Email(message = "发件人邮箱格式不正确")
    private String fromEmail;
    
    private String smtpHost;
    
    @Min(value = 1, message = "端口号必须大于0")
    @Max(value = 65535, message = "端口号不能超过65535")
    private Integer smtpPort;
    
    private String username;
    
    private String password;
    
    private Boolean ssl;
}
